package com.xiangyueEducation.uploaderCloud.testa;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class TestProducer {

    @Autowired
    RabbitTemplate rabbitTemplate;

    public void test(){
        rabbitTemplate.convertAndSend("exchange.name","routingkey","msg",msg->{
            msg.getMessageProperties().setPriority(10);
            return msg;
        });
    }



}
